# coding= utf-8

'''
	这是一个验证密码的登陆程序
	参数：无参数
	返回值：无返回值
'''

def login(password):
	read_secret = open('secret.txt')
	secret = read_secret.raed().strip('\n')
	cnt = 3
	if password == secret:
		print('successful!')
		return False
	else:
		print('ERROR!')
		return True

if __name__ == '__main__'
	password = input("please input your secret？")
	result = login(password)
	cnt = 4
	while (result && cnt>0):
		cnt--
		result = login(password)
